package com.lebang.mapper;

import com.lebang.configuration.datasource.DataSource;
import com.lebang.domain.CencesClickInfo;
import com.lebang.example.CencesClickInfoExample;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import com.lebang.model.cences.ClickInfoData;

/**
 * CencesClickInfoMapper继承基类
 */
@Mapper
public interface CencesClickInfoMapper extends MyBatisBaseDao<CencesClickInfo, Integer, CencesClickInfoExample> {

    @DataSource("commonDB")
    int addCountByAppNameAndSdkKeyAndAppStore(@Param("appStore") String appStore, @Param("sdkKey") String sdkKey, @Param("appName") String appName, @Param("star") int star);

    @DataSource("commonDB")
    Integer checkExits(@Param("appStore") String appStore, @Param("sdkKey") String sdkKey, @Param("appName") String appName, @Param("appId") Integer appId);

    @DataSource("commonDB")
    List<CencesClickInfo> page(CencesClickInfoExample example);

    @DataSource("commonDB")
    void addCountById(@Param("id") Integer id, @Param("star") int star);

    @DataSource("commonDB")
    List<ClickInfoData> selectAllDataByDate(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    @DataSource("commonDB")
    int insertClickInfo(CencesClickInfo data);
}